package com.kongyz.demo1;

import com.kongyz.demo1.shape.Circle;
import com.kongyz.demo1.shape.Rectangle;
import com.kongyz.demo1.shape.Shape;

/**
 * @author kongyz
 * @date 2018/6/28 22:42
 * @Description:
 */
public class Demo1 {
    public static void main(String[] args) {
        Shape circle=new Circle();

        Shape redCircle=new RedShapeDecorator(new Circle());
        Shape redRectangle=new RedShapeDecorator(new Rectangle());

        System.out.println("不带装饰器的情况：");
        circle.draw();

        System.out.println("\n带装饰器：");
        redCircle.draw();

        System.out.println("\n带装饰器：");
        redRectangle.draw();


    }


}
